package com.company;
import org.springframework.beans.factory.FactoryBean;
/**
 * Created by ruoan on 2020/9/24 22:14
 */
public class MyBean implements FactoryBean<Book> {
    @Override
    public Book getObject() throws Exception {
        Class<?> clz = Class.forName("com.company.Book");
        Book book = (Book)clz.newInstance();
        return book;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
